<?php
/**
 * Description of ModuleTestcase
 *
 * @author joona
 */
class Lib_ModuleTestcase extends Lib_TestBase
{
    public static function setUpBeforeClass()
    {
        Lib_RegistryModifier::backupApplicationINI();
        Lib_RegistryModifier::modifyApplicationINI(
            array(
                'DB_USER = sweatshop' => 'DB_USER = root',
                'DB_PASS = sweatshop' => 'DB_PASS = ',
                'DB_NAME = sweatshop' => 'DB_NAME = test_sweatshop',
                'sweatshop_system.log' => 'sweatshop_system_test.log',
                'sweatshop_query.log' =>  'sweatshop_query_test.log',
                'sweatshop_query_error.log' => 'sweatshop_query_error_test.log',
            )
        );
        Core_Registry::reset();
        Lib_QueryWrapper::setUp('root', null, 'test_sweatshop', 'localhost');
        Lib_QueryWrapper::createTestDatabase();
    }

    public static function teardownAfterClass()
    {
        Lib_QueryWrapper::dropTestDatabase();
        Lib_RegistryModifier::returnOriginalApplicationINI();
        Core_Registry::reset();
    }
}
